import request from "@/request/request.js";

export function getAllGoods(page = 1, pagesize = 8 ){
    return request({
        url: '/goods/getAllGoods',
        params:{
            page,
            pagesize
        }
    })
}

export function getHotGoods(page = 1, pagesize = 10){
    return request({
        url: '/goods/getHotGoods',
        params:{
            page,
            pagesize
        }
    })
}

export function getIndexGoods(){
    return request({
        url: '/goods/getIndexGoods',
    })
}

export function getGoodsDetail(id){
    return request({
        url: '/goods/getGoodsDetail',
        params:{
            id
        }
    })
}

export function getGoodsListByTypeId(typeId){
    return request({
        url:'/goods/getGoodsByTypeId',
        params:{typeId}
    })
}

export function searchGoodsByName(goodsName){
    return request({
        url:'/goods/searchGoodsByName',
        params:{goodsName}
    })
}


